package pl.edu.utp.kursy;

import java.io.IOException;
import java.util.Properties;

public class StringsProperties {
    
    public static final org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(StringsProperties.class);
    
    private static final Properties properties = new Properties();
    
    static{
        try {
            properties.loadFromXML(StringsProperties.class.getClassLoader().getResourceAsStream("strings.xml"));
        } catch (IOException  ex) {
            logger.fatal(ex.getMessage());
            System.exit(1);
        }
    }
    
    public static String getString(String key){
        return properties.getProperty(key);
    }
    
    public static void setString(String key, String value){
        properties.setProperty(key, value);
    }
}
